// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store.js'
import axios from 'axios'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import echarts from 'echarts'
Vue.prototype.$echarts = echarts
import Pinyin from "js-pinyin";
Vue.use(ElementUI);
// import {Message} from 'element-ui'
// Vue.use(Message)
// Vue.prototype.$message=Message
import vueAxios from 'vue-axios'
Vue.use(vueAxios,axios)
axios.defaults.baseURL = 'https://api.shop.eduwork.cn'


axios.interceptors.request.use(config => {
        console.log(config);
        // 在最后必须return config
        config.headers.Authorization ='Bearer'+ sessionStorage.getItem('token')
        return config;
    })

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
	store,
  components: { App },
  template: '<App/>'
})
